package com.xujinchen.scanner;

import java.util.Scanner;

public class Demo05 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        //和
        double sum =0;
        //计算输入了多少数
        int m =0;
        while (scanner.hasNextDouble()){
            double x = scanner.nextDouble();
            //
            m=m+1;
            sum = sum +x;
        }
        System.out.println(m+"个数和为"+sum);
        System.out.println(m+"个数平均值"+(sum/m));

        scanner.close();
    }
}
